Skip to content

fix(WF-1): use inside sequence/parallel blocks per spec 3.2 (ruby + py) - #852

Merged
ronaldtse merged 2 commits into
mainfrom
wo18-g5-ruby
Nov 14, 2026
Merged

ronaldtse merged 2 commits into
mainfrom
wo18-g5-ruby

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

fix(WF-1): use inside sequence/parallel blocks per spec 3.2 (ruby + py)

The canonical PG grammar's rule_line now accepts the use directive
inside sequence/parallel blocks (sha 52949cb3... - previously
b0f7a7ca...), and both consumers implement the rs-canonical semantics:

  • ruby: the concerns grammar + document_builder/node_adapter flatten a
    used ruleset's rules into the enclosing collection in position; an
    override block merges per-rule (child-wins on exact from-equality);
    a non-rule target (funcalls/stage runs inside the used ruleset) is a
    named load error - non-rule items cannot join a pass.
  • py: grammar regenerated via sync_isc_grammar.py (sha pin bumped, pin
    test enforces); the containment rejection in isc.py is removed and
    replaced by the same flatten + per-rule-merge + named-error path.

rs is the reference implementation and is unchanged. No corpus map
uses the constructs (428 maps parse unchanged). Gates: rake 428/0/11;
py suite green (the one test_api failure is a pre-existing stale un-bul
vector, fixed separately); py-vs-py parity 435/435 canonical + raw vs
the hand parser; cross-grammar harness 412/435 identical - same three
known divergence kinds as the clean-main baseline, no new divergences.

The canonical PG grammar's rule_line now accepts the use directive
inside sequence/parallel blocks (sha 52949cb3... - previously
b0f7a7ca...), and both consumers implement the rs-canonical semantics:

- ruby: the concerns grammar + document_builder/node_adapter flatten a
  used ruleset's rules into the enclosing collection in position; an
  override block merges per-rule (child-wins on exact from-equality);
  a non-rule target (funcalls/stage runs inside the used ruleset) is a
  named load error - non-rule items cannot join a pass.
- py: grammar regenerated via sync_isc_grammar.py (sha pin bumped, pin
  test enforces); the containment rejection in isc.py is removed and
  replaced by the same flatten + per-rule-merge + named-error path.

rs is the reference implementation and is unchanged. No corpus map
uses the constructs (428 maps parse unchanged). Gates: rake 428/0/11;
py suite green (the one test_api failure is a pre-existing stale un-bul
vector, fixed separately); py-vs-py parity 435/435 canonical + raw vs
the hand parser; cross-grammar harness 412/435 identical - same three
known divergence kinds as the clean-main baseline, no new divergences.
@ronaldtse
ronaldtse merged commit 95808ed into main Nov 14, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant